package com.byb.server.service.dto;


import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;
import javax.persistence.Lob;

/**
 * A DTO for the Die entity.
 */
public class DieDTO implements Serializable {

    private Long id;

    @Lob
    private String dieInfo;

    private Long productId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDieInfo() {
        return dieInfo;
    }

    public void setDieInfo(String dieInfo) {
        this.dieInfo = dieInfo;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        DieDTO dieDTO = (DieDTO) o;
        if(dieDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), dieDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "DieDTO{" +
            "id=" + getId() +
            ", dieInfo='" + getDieInfo() + "'" +
            "}";
    }
}
